#####################################################
#
# project.mk
#
# Setting general project variables.
#
# Need to define environment variables: 
#    PROJECT_NAME: The project directory name.
#    PROJECT_BASE: The project root directory.
#
#####################################################

ifeq ($(CURDIR),)
	ifneq ($(OS),Windows_NT)
	   CURDIR := $(shell pwd)
	else
	   CURDIR := $(subst \,/,$(shell cd))
	endif
endif

VERSION       := 1.2.12
AUTHOR        := zhangpeihao

SEP_DIRS      := $(subst /zsystem, /zsystem,$(CURDIR))
WORDS_NO      := $(words $(SEP_DIRS))
LAST_SEP_DIR  := $(word $(WORDS_NO),$(SEP_DIRS))
PROJECT_BASE  := $(patsubst %$(LAST_SEP_DIR),%,$(CURDIR))


PROJECT_BASE  := $(strip  $(PROJECT_BASE))
PROJECT_NAME  := $(notdir $(PROJECT_BASE))

OPENSOURCE_INC := ${PROJECT_BASE}/opensource/local/include
OPENSOURCE_LIB := ${PROJECT_BASE}/opensource/local/lib